<?php
namespace Vido\Controller;
use Think\Controller;
class AdminController extends Controller {
    public function index(){
        $this->display();
    }
	public function load(){
		session("user",TRUE);
		$this->success("登录成功","",100);		
	}
	public function up_po(){
		    $upload = new \Think\Upload();// 实例化上传类
   			$upload->maxSize   =     0 ;// 设置附件上传大小
    	    $upload->exts      =     array('jpg', 'gif', 'png', 'jpeg','mp4','rmvb');// 设置附件上传类型
   		    $upload->rootPath  =     './Upload'; // 设置附件上传根目录
   		    $upload->savePath  =     '/img'; // 设置附件上传（子）目录
    		// 上传文件 
    		$info   =   $upload->upload(); 
   			 if(!$info) {// 上传错误提示错误信息
      			  $this->error($upload->getError());
  			  }else{// 上传成功
  			 	 foreach($info as $file){
  			 	    $po_i="http://192.168.1.102:8081";
  			 	 	$dokj["img"]=$po_i.=$file['savepath'].$file['savename'];
  			 	 	 $this->ajaxReturn($dokj);
        			
   				 }
     		
   			  
   			 }
	}
	public function pay_w(){
	$time=time();
	$order=array(
   	 'body'=>'哈哈哈',
   	 'total_fee'=>1,
    	'out_trade_no'=>strval($time),
    	'product_id'=>1
   	 );
	weixinpay($order);
	}
	
	function oss(){
		echo 222;
	   oss_upload('http://192.168.1.102:8081/img/03.jpg');

	}
	
    function duanxing(){

send_sms_code('13538190372','哈哈哈哈哈哈');
echo '发送成功';
	}

}  